#include<iostream>
#include<random>
#include<algorithm>
using namespace std;

extern "C" int FindMax(int *data, int count);

int main(void)
{
	int a[10];
	mt19937 g;

	generate(a, a + 10, [&g](void) -> int {return g() % 100;});
	for_each(a, a + 10, [](int n) -> void {cout<< n << "\t";});
	cout<< endl;

	int v = FindMax(a, 10);
	cout<< "the max value is " << v << "\n";

	return 0;
}
